home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Files / XTND 1.3.6 / Translator Examples / Text Translator / MakeFile next >
Encoding:
Makefile  |  1991-05-01  |  2.1 KB  |  55 lines  |  [TEXT/MPS ]

  1. #################################################################################
  2. #    File:    MakeFile for the Text translator                            #
  3. #    Target:    Text                                                    #
  4. #################################################################################
  5.  
  6. TranslatorName = Text        ### Whatever you like, but try to be descriptive
  7.  
  8. Creator = 'Clrs'            ### This may be changed if you like (if you want to use a different icon, for instance
  9. Type = 'Fltr'                ### This must not be changed
  10.  
  11. ResTypeIn = 'FLTI'            ### This is for text import translators
  12. ResNumIn = 256                ### Your choice, but must match the number in the FTYP resource
  13. ResTypeOut = 'FLTE'            ### This is for text export translators
  14. ResNumOut = 257            ### Your choice, but must match the number in the FTYP resource
  15.  
  16. Sources = TextImport.c ∂
  17.         TextExport.c        ### For documentation only, not used by make
  18.  
  19. HeaderPath = :::XTND Headers:XTNDCIncludes:        ### Change this if you reorganize the folder structure
  20.  
  21. Headers = "{HeaderPath}"XTNDInterface.h ∂
  22.         "{HeaderPath}"XTNDTextTranslator.h        ### Required headers for a text import and export translator
  23.  
  24.  
  25. ### Default Dependency/Build Rule
  26.  
  27. .c.o ƒ .c {Headers}
  28.     C {Default}.c {COptions} -r -d MPW -d MPWC
  29.  
  30.  
  31. ### This copies the resources from TextImport.π.rsrc into the translator file.  It
  32. ### deletes the old resource fork before adding the new resources.  This must be the
  33. ### first dependency for the target file, since it deletes all existing resources.
  34.  
  35. {TranslatorName} ƒƒ TextImport.r TextImport.π.rsrc MakeFile
  36.     Rez TextImport.r -t {Type} -c {Creator} ∂
  37.         -o {TranslatorName}
  38.  
  39.  
  40. ### This puts the import code into the resource type and number specified above in the translator file
  41.  
  42. {TranslatorName} ƒƒ TextImport.c.o MakeFile
  43.     Link -rt {ResTypeIn}={ResNumIn} -m main -sn Main="Text - IN" ∂
  44.         TextImport.c.o ∂
  45.         "{Libraries}"Interface.o ∂
  46.         -o {TranslatorName}
  47.  
  48. ### This puts the export code into the resource type and number specified above in the translator file
  49.  
  50. {TranslatorName} ƒƒ TextExport.c.o MakeFile
  51.     Link -rt {ResTypeOut}={ResNumOut} -m main -sn Main="Text - OUT" ∂
  52.         TextExport.c.o ∂
  53.         "{Libraries}"Interface.o ∂
  54.         -o {TranslatorName}
  55.